Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jedd/cxpla 154 enforce nullability analysers in objects and use required #202

Conversation

JR-Morgan
Copy link
Member

Enables for the Speckle.Objects project the remaining nullability analysers for ensuring correct nullability and use of required keyword of our object models.

CS8618 - Non-nullable variable must contain a non-null value when exiting constructor.

  • Enable CS8618 for Objects, still supressed for SDK
  • Added required keyword for Pontcloud and Surface
  • Surface class has some complex behaviour around the flattening the control point data for efficient serilization. For now I've had to expose a parametered constructor in addition to required properties, we could simplyfy this by re-structuring the class a little.

Copy link

linear bot commented Jan 10, 2025

Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 0% with 20 lines in your changes missing coverage. Please review.

Project coverage is 69.09%. Comparing base (69167dc) to head (77170bf).
Report is 5 commits behind head on dev.

Files with missing lines Patch % Lines
src/Speckle.Objects/Geometry/Surface.cs 0.00% 20 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              dev     #202       +/-   ##
===========================================
+ Coverage   57.26%   69.09%   +11.82%     
===========================================
  Files         243      259       +16     
  Lines       10023    10739      +716     
  Branches     1090     1091        +1     
===========================================
+ Hits         5740     7420     +1680     
+ Misses       4026     2972     -1054     
- Partials      257      347       +90     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JR-Morgan JR-Morgan requested a review from clairekuang January 15, 2025 18:15
SetControlPoints(controlPoints);
}

public Surface(IList<double> pointData, int countU, int countV)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise, if the previous constructor is used and we are recommending to not set pointData directly, this constructor should be removed instead

@clairekuang clairekuang merged commit f79ae7e into dev Jan 15, 2025
4 checks passed
@clairekuang clairekuang deleted the jedd/cxpla-154-enforce-nullability-analysers-in-objects-and-use-required branch January 15, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants